package com.woniuxy.yoga.user.model.form;

import io.swagger.annotations.ApiModel;
import io.swagger.annotations.ApiModelProperty;
import lombok.Data;

import javax.validation.constraints.NotNull;
import javax.validation.constraints.Pattern;

@Data
@ApiModel("用户实名认证参数")
public class IdentifyForm {

    @ApiModelProperty("真实姓名")
    @NotNull
    private String realName;

    @ApiModelProperty("身份证号")
    @NotNull
    @Pattern(regexp = "[1-9][0-9]{5}(19\\d{2}|20[0-1]\\d|202[1-3])((0[13578]|1[02])(0[1-9]|[1-2]\\d|3[0-1])|(0[469]|11)(0[1-9]|[1-2]\\d|30)|02(0[1-9]|1\\d|2\\d))\\d{3}(\\d|X)", message = "身份证不合法")
    private String idCard;
}
